<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%-- <%@ page session="false" %> --%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="Common.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Main</title>
<script type="text/javascript">
$(function(){
	$("#PW").keyup(function(e){
		if(e.keyCode==13) login();
	});
});
function join(){
	location.href="member.do?action=joinP";
}
function login(){
	var url = "member.do",
		data = $("#loginForm").serialize();
	
	$.postJSON(url, data, function(json){
		if(json = 1){
			alert("로그인 성공");
		}
		else{
			alert("로그인 실패");
		}
	});
}
</script>
<body style="background-color: #fff;">
<div class="wrapper">
	<div class="content">
	<img src="img/allin.jpg" alt="" class="img-thumbnail">
	<br/><br/>
	<form id="loginForm" name="loginForm" method="post">
		<input type="hidden" class="form-control input-sm" id="action" name="action" value="login" ><br/>
		<input type="text" class="form-control input-sm" id="ID" name="ID" placeholder="ID">
		<input type="password" class="form-control input-sm" id="PW" name="PW" placeholder="Password"><br/>
			<div align="center">
				<button type="button" class="btn btn-primary btn-sm" style="width: 80px;">Login</button>
		  		<button type="button" class="btn btn-default btn-sm">Forget ID/Password</button>
		  		<br/><br/>
			<img src="img/login_tip.png" alt="가입하기" class="img-rounded" style="cursor: pointer;" onclick="join();">
			</div>
	</form>	
		</div>
</div>

</body>
</html>
